package com.thb.business.memcached;

public class MKeyUtils {
	
	private static String ACTIVE_JOGINS_KEY = "active:joins";
	
	private static String POSTER_PRAISE_KEY = "poster:praise";
	
	private static String POSTER_PRAISE_COUNT_KEY = "poster:praise:count";
	
	private static String POSTER_COMMENT_KEY = "poster:comment";
	
	private static String POSTER_COMMENT_COUNT_KEY = "poster:comment:count";
	
	private static String COMMENT_COMMENT_KEY = "comment:comment";
	
	private static String IIMPLE_POST_KEY = "poster:simple";
	
	private static String ACTIVE_USER_JOGINS_KEY = "active:joins:user";
	
	public static String getActiveJoinsKey(String activeId){
		return String.format("%s:%s", ACTIVE_JOGINS_KEY,activeId);
	}
	
	public static String getPosterPraiseKey(String posterId,String userId){
		return String.format("%s:%s:%s", POSTER_PRAISE_KEY,posterId,userId);
	}
	
	public static String getPosterCommentKey(String posterId){
		return String.format("%s:%s", POSTER_COMMENT_KEY,posterId);
	}
	
	public static String getCommentCommentKey(String commentId){
		return String.format("%s:%s", COMMENT_COMMENT_KEY,commentId);
	}
	
	public static String getPosterSimpleKey(String pid){
		return String.format("%s:%s", IIMPLE_POST_KEY,pid);
	}
	
	public static String getPosterPraiseCountKey(String pid){
		return String.format("%s:%s", POSTER_PRAISE_COUNT_KEY,pid);
	}
	
	public static String getPosterCommentCountKey(String pid){
		return String.format("%s:%s", POSTER_COMMENT_COUNT_KEY,pid);
	}
	
	public static String getUserJoinsActiveKey(String uid){
		return String.format("%s:%s", ACTIVE_USER_JOGINS_KEY,uid);
	}

}
